import request from '@/utils/request'

export const picimgApi = (data) =>
  request({
    url: `/api/user-service/user/imageCode/${data}`,
    responseType: 'arraybuffer'
  })
export const loginApi = (data) => request({
  url: '/api/user-service/user/login',
  method: 'post',
  data
})
export const getuserApi = (id) => request({
  url: `/api/user-service/user/${id}`
})
export const skuTop = (data) => request({
  url: `/api/order-service/report/skuTop/${data.topValue}/${data.start}/${data.end}`
})
export const taskReportInfo = (data) => request({
  url: `/api/task-service/task/taskReportInfo/${data.start}/${data.end}`
})
export const orderAmount = (data) => request({
  url: `/api/order-service/report/orderAmount?start=${data.start}&end=${data.end}`
})
export const orderReportInfo = (data) => request({
  url: `/api/order-service/report/orderCount?start=${data.start}&end=${data.end}`
})
export const regionCollect = (data) => request({
  url: `/api/order-service/report/regionCollect/${data.start}/${data.end}`
})
export const amountCollect = (data) => request({
  url: `/api/order-service/report/amountCollect/${data.collectType}/${data.start}/${data.end}`
})
export const nodeCollect = () => request({
  url: '/api/vm-service/node/nodeCollect'
})
export const userService = () => request({
  url: '/api/user-service/partner/count'
})
export const vmService = () => request({
  url: '/api/vm-service/node/count'
})
export const orderAmountl = (start, end) => request({
  url: `/api/order-service/report/orderAmount?start=${start}&end=${end}`
})
export const orderReportInfol = (start, end) => request({
  url: `/api/order-service/report/orderCount?start=${start}&end=${end}`
})
export const totalBill = (start, end) => request({
  url: `/api/order-service/report/totalBill?start=${start}&end=${end}`
})
